package flst.ipiweb.struts.action.client;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import flst.ipiweb.common.Article;
import flst.ipiweb.service.ServiceArticle;

public class MenuClientListeArticlesAction extends Action {

	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {

		ServiceArticle sArticle = new ServiceArticle();

		List<Article> listArticle = sArticle.listerArticles();
		request.setAttribute("listArticle", listArticle);

		return mapping.findForward("menuClientListeArticles_ok");
	}
}